from lxml import etree
import requests
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36 Edg/91.0.864.71'}
r = requests.get(url='https://cs.58.com/ershoufang/',headers=headers)
print(r.text)
tree = etree.parse('test.html')
x = tree.xpath('//p')
print(x)